# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-jaraco.test
pkgver=5.3.0
_commit=fbbad0edd3b11b80e73f4a517c0518399e727b7c
pkgrel=3
pkgdesc="Testing support by jaraco"
url="https://github.com/jaraco/jaraco.test"
license=('MIT')
arch=('any')
depends=('python-jaraco.context' 'python-jaraco.functools')
makedepends=('git' 'python-setuptools-scm' 'python-wheel' 'python-build' 'python-installer')
checkdepends=('python-pytest-enabler' 'python-pytest-mypy')
source=("git+https://github.com/jaraco/jaraco.test.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd jaraco.test
  python -m build --wheel --no-isolation
}

check() {
  cd jaraco.test
  python -m pytest
}

package() {
  cd jaraco.test
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
